{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d940e2f0-6818-4a90-8e64-7f9d2ac07433",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'s01': [4.875, 15.113], 's02': [6.75, 18.9], 's03': [5.25, 14.175], 's04': [4.375, 13.125], 's05': [2.875, 8.05], 's06': [5.625, 14.625], 's07': [5.875, 14.688], 's08': [5.5, 11.0]}\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "dic={'s01':3.1,'s02':2.8,'s03':2.7,'s04':3.0,\n",
    "    's05':2.8,'s06':2.6,'s07':2.5,'s08':2.0\n",
    "    }\n",
    "xs={}\n",
    "for i in range(8):\n",
    "    xsfs=[]\n",
    "    nums_list=[]\n",
    "    list_columns=10\n",
    "    for j in range(list_columns):\n",
    "        num=random.randint(0,10)\n",
    "        nums_list.append(num)\n",
    "    nums_list.sort()\n",
    "    del nums_list[0]\n",
    "    del nums_list[-1]\n",
    "    aver=round(sum(nums_list)/len(nums_list),3)\n",
    "    scor=round(aver * dic['s0' + str(i + 1)],3)\n",
    "    xsfs.append(aver)\n",
    "    xsfs.append(scor)\n",
    "    xs['s0' + str(i + 1)]=xsfs\n",
    "print(xs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "5aee3650-be92-4c62-9bcc-d735e82f1b9c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['s01', 4.75, 3.1, 14.725]\n",
      "['s02', 4.5, 2.8, 12.6]\n",
      "['s03', 3.875, 2.7, 10.463]\n",
      "['s04', 4.625, 3.0, 13.875]\n",
      "['s05', 4.625, 2.8, 12.95]\n",
      "['s06', 4.75, 2.6, 12.35]\n",
      "['s07', 4.875, 2.5, 12.188]\n",
      "['s08', 5.375, 2.0, 10.75]\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "dic={'s01':3.1,'s02':2.8,'s03':2.7,'s04':3.0,\n",
    "     's05':2.8,'s06':2.6,'s07':2.5,'s08':2.0\n",
    "    }\n",
    "nums_list=[]\n",
    "result_list=[]\n",
    "coaches=8\n",
    "columns=10\n",
    "for i in range(coaches):\n",
    "    nums_list.append([])\n",
    "    result_list.append([])\n",
    "    for j in range(columns):\n",
    "        num=random.randint(0,10)\n",
    "        nums_list[i].append(num)\n",
    "    nums_list[i].sort()\n",
    "    del nums_list[i][0]\n",
    "    del nums_list[i][-1]\n",
    "    aver=sum(nums_list[i])/len(nums_list[i])\n",
    "    scor=round(aver * dic['s0' + str(i + 1)],3)\n",
    "    result_list[i].append('s0' + str(i + 1))\n",
    "    result_list[i].append(aver)\n",
    "    result_list[i].append(dic['s0' + str(i + 1)])\n",
    "    result_list[i].append(scor)\n",
    "    print(result_list[i])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "3b1f0f6e-27f3-40bc-862d-912bd64eb4c9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['s01', 8.625, 3.1, 26.738]\n",
      "['s02', 2.25, 2.8, 6.3]\n",
      "['s03', 5.0, 2.7, 13.5]\n",
      "['s04', 2.875, 3.0, 8.625]\n",
      "['s05', 5.125, 2.8, 14.35]\n",
      "['s06', 6.0, 2.6, 15.6]\n",
      "['s07', 1.75, 2.5, 4.375]\n",
      "['s08', 3.625, 2.0, 7.25]\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "dic={'s01':3.1,'s02':2.8,'s03':2.7,'s04':3.0,\n",
    "     's05':2.8,'s06':2.6,'s07':2.5,'s08':2.0\n",
    "    }\n",
    "#nums_list=[]\n",
    "result_list=[]\n",
    "coaches=8\n",
    "columns=10\n",
    "for i in range(coaches):\n",
    "    nums_list=[]\n",
    "    #nums_list.append([])\n",
    "    result_list.append([])\n",
    "    for j in range(columns):\n",
    "        num=random.randint(0,10)\n",
    "        nums_list.append(num)\n",
    "    nums_list.sort()\n",
    "    del nums_list[0]\n",
    "    del nums_list[-1]\n",
    "    aver=sum(nums_list)/len(nums_list)\n",
    "    scor=round(aver * dic['s0' + str(i + 1)],3)\n",
    "    result_list[i].append('s0' + str(i + 1))\n",
    "    result_list[i].append(aver)\n",
    "    result_list[i].append(dic['s0' + str(i + 1)])\n",
    "    result_list[i].append(scor)\n",
    "    print(result_list[i])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5997fba3-5381-4808-9f30-2917631c1255",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "61d2c769-5a51-45b3-b93e-571f93c3238a",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['s01' '4.5' '3.1' '13.95']\n",
      " ['s02' '5.75' '2.8' '16.1']\n",
      " ['s03' '6.625' '2.7' '17.888']\n",
      " ['s04' '5.125' '3.0' '15.375']\n",
      " ['s05' '6.625' '2.8' '18.55']\n",
      " ['s06' '4.5' '2.6' '11.7']\n",
      " ['s07' '3.125' '2.5' '7.812']\n",
      " ['s08' '4.625' '2.0' '9.25']]\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "import numpy as np\n",
    "dic={'s01':3.1,'s02':2.8,'s03':2.7,'s04':3.0,\n",
    "    's05':2.8,'s06':2.6,'s07':2.5,'s08':2.0\n",
    "    }\n",
    "xsfs=[]\n",
    "for i in range(8):\n",
    "    xsfs.append([])\n",
    "    nums_list=[]\n",
    "    list_columns=10\n",
    "    for j in range(list_columns):\n",
    "        num=random.randint(0,10)\n",
    "        nums_list.append(num)\n",
    "    nums_list.sort()\n",
    "    del nums_list[0]\n",
    "    del nums_list[-1]\n",
    "    aver=round(sum(nums_list)/len(nums_list),3)\n",
    "    scor=round(aver * dic['s0' + str(i + 1)],3)\n",
    "    #print(aver)\n",
    "    #print(scor)\n",
    "    xsfs[i].append('s0'+str(i+1))\n",
    "    xsfs[i].append(aver)\n",
    "    xsfs[i].append(dic['s0'+str(i+1)])\n",
    "    xsfs[i].append(scor)\n",
    "    #print(xsfs[i])\n",
    "print(np.array(xsfs))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "5e57a8c4-a4c6-48c3-9680-bfd33f6dbe18",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['s01' '5.875' '3.1' '18.213']\n",
      " ['s02' '1.75' '2.8' '4.9']\n",
      " ['s03' '5.875' '2.7' '15.863']\n",
      " ['s04' '6.625' '3.0' '19.875']\n",
      " ['s05' '6.25' '2.8' '17.5']\n",
      " ['s06' '5.875' '2.6' '15.275']\n",
      " ['s07' '7.125' '2.5' '17.812']\n",
      " ['s08' '5.625' '2.0' '11.25']]\n"
     ]
    }
   ],
   "source": [
    "import random as rd\n",
    "import numpy as np\n",
    "dic={'s01':3.1,'s02':2.8,'s03':2.7,'s04':3.0,\n",
    "     's05':2.8,'s06':2.6,'s07':2.5,'s08':2.0\n",
    "     }\n",
    "stud_scor=[]\n",
    "for i in range(8):\n",
    "    stud_scor.append([])\n",
    "    nums_list=[]\n",
    "    for j in range(10):\n",
    "        num=rd.randint(0,10)\n",
    "        nums_list.append(num)\n",
    "    nums_list.sort()\n",
    "    del nums_list[0]\n",
    "    del nums_list[-1]\n",
    "    aver=sum(nums_list)/len(nums_list)\n",
    "    scor=round(aver*dic['s0'+str(i+1)],3)\n",
    "    stud_scor[i].append('s0'+str(i+1))\n",
    "    stud_scor[i].append(aver)\n",
    "    stud_scor[i].append(dic['s0'+str(i+1)])\n",
    "    stud_scor[i].append(scor)\n",
    "print(np.array(stud_scor))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b04d4e8d-6c28-4934-ac36-069f58f6edf8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "WindsorWu",
   "language": "python",
   "name": "windsorwu"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
